package com.winsdom.mapper;

import com.winsdom.entity.SysUserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

/**
 * <p>
 * 用户角色关联表 Mapper 接口
 * </p>
 *
 * @author
 * @since 2025-05-12
 */
@Mapper
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {

    /**sys_role
     * 根据用户ID删除角色关联
     * @param id
     */
    @Delete("delete from sys_user_role where user_id = #{id}")
    void deleteByUserId(Long id);
}
